package com.yuantu.judiciary.model.api;

import org.springframework.http.HttpMethod;

/**
 * 外部接口请求参数
 *
 * @author syw
 * @since 2023-06-30
 **/
public abstract class BaseApiRequestMsg implements IBaseApiRequestMsg {

    private final String url;
    private final HttpMethod httpMethod;
    private final String body;
    private final String type;
    private String ticket;
    private String key;
    private String totalUrl;

    protected BaseApiRequestMsg(String url, HttpMethod httpMethod, String body, String type) {
        this.url = url;
        this.httpMethod = httpMethod;
        this.body = body;
        this.type = type;
    }

    protected BaseApiRequestMsg(String url, HttpMethod httpMethod, String body, String type, String ticket, String key, String totalUrl) {
        this.url = url;
        this.httpMethod = httpMethod;
        this.body = body;
        this.type = type;
        this.ticket = ticket;
        this.key = key;
        this.totalUrl = totalUrl;
    }

    @Override
    public String getUrl() {
        return url;
    }

    @Override
    public HttpMethod getHttpMethod() {
        return httpMethod;
    }

    @Override
    public String getBody() {
        return body;
    }

    @Override
    public String getType(){
        return type;
    }

    public String getTicket() {
        return ticket;
    }

    public String getKey() {
        return key;
    }

    public String getTotalUrl() {
        return totalUrl;
    }
}
